<%@ page language="java" pageEncoding="UTF-8"%>

<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html:html lang="true">
	<head>
		<html:base />
		<title>View Report</title>
		<link href="form/login.css" rel="stylesheet" type="text/css">
	</head>
  
	<body>
		<logic:notPresent name="userid" scope="session">
			<logic:redirect forward="login_error"></logic:redirect>
		</logic:notPresent>
		<logic:notPresent name="admin" scope="session">
			<logic:redirect page="/not_admin.jsp"></logic:redirect>
		</logic:notPresent>
		<logic:notPresent name="show_list" scope="session">
			<logic:redirect page="/illegal_access.jsp"></logic:redirect>
		</logic:notPresent>
		<div class="container">
			<div class="header">
				<html:img page="/yssz.jpg"/>
				<div id="login">
					<html:link action="mainPre">main page</html:link>
				</div>
			</div>
			<div class="content">
				<h1>View Report</h1>
				<table width="970px" border="1" cellspacing="0" cellpadding="0">
					<tr>
						<th width="70">report</th>
						<th width="80">reporter</th>
						<th width="70">post id</th>
						<th width="180">content</th>
						<th width="80">poster</th>
						<th width="170">reason</th>
						<th width="105">report time</th>
						<th width="70">dealed</th>
						<th width="142">operation</th>
					</tr>
					<logic:iterate id="reports" name="show_list" scope="session">
						<tr>
							<td align="center"><bean:write name="reports" property="reportid"/></td>
							<td align="center"><bean:write name="reports" property="reportername"/></td>
							<td align="center"><bean:write name="reports" property="posterid"/></td>
							<td align="center"><bean:write name="reports" property="postercontent"/></td>
							<td align="center"><bean:write name="reports" property="raisername"/></td>
							<td><bean:write name="reports" property="reason"/></td>
							<td align="center"><bean:write name="reports" property="reporttime"/></td>
							<td align="center"><bean:write name="reports" property="status"/></td>
							<td align="center">
								<logic:match name="reports" property="status" value="false">
									<bean:define id="listid" name="reports" property="listid"></bean:define>
									<a href="/se3/deleteByReport.do?listid=<%=listid %>">delete</a><br>
									<a href="/se3/banByReport.do?listid=<%=listid %>">delete and ban</a><br>
									<a href="/se3/ignore.do?listid=<%=listid %>">ignore</a>
								</logic:match>
							</td>
						</tr>
					</logic:iterate>
				</table>
			</div>
			<div class="footer">
				<p>copyright@yssz</p>
			</div>
		</div>
	</body>
</html:html>
